#ifndef DISPLAY_H_
#define DISPLAY_H_

# include "stdio.h"
# include "all_struct.h"
# include "windows.h"

/*TODO: 此处全权由周珂宇负责。
这命名就很蛋疼了，当时我写的太随意了，
这多了之后如果没有注释谁能马上知道它们的function是谁和谁啊? 为了答辩
只能硬背一下了。。。两位要注意啊。   --zky
*/

//guest 打印航班format
static void Display(Airplane* p)
{
	printf("%s\t%s\t\t%s\t\t%s\t\t%s\t\t",p->flightNumber,p->startCity,p->endCity,
	       p->company,p->type);
	printf("%d.%d.%d/%d:%d/%d:%d\t",
	       p->time.year,p->time.month,p->time.day,
	       p->time.original_hour,p->time.original_minute,
	       p->time.end_hour,p->time.end_minute);
	printf("%5.2f     ",p -> price - p -> price * p -> discount);
	printf("      %-2d\n",p->remainQuantity);
	printf("----------------------------------------------------------");
	printf("----------------------------------------------------------\n");
}

// admin 打印航班format
static void Display2(Airplane* p)
{
	printf("%s\t%s\t\t%s\t\t%s\t\t%s\t\t",p->flightNumber,p->startCity,p->endCity,
	       p->company,p->type);
	printf("%d.%d.%d - %d:%d - %d:%d     ",
	       p->time.year,p->time.month,p->time.day,
	       p->time.original_hour,p->time.original_minute,
	       p->time.end_hour,p->time.end_minute);
	printf("%5d\t",p->price);
	printf("%-1.2f\t    ",p->discount);
	printf("%-5.2f\t  ",p->price - p->price*p->discount);
	printf("%-2d\t  ",p->ticketQuantity);
	printf("%-2d\n",p->remainQuantity);
	printf("----------------------------------------------------------------------------------");
	printf("----------------------------------------------------------\n");
}

/*原来有个Display3，但因为无用，就删了
*/

//guest_air/recommend函数 打印航班format
static void Display4(Airplane* p)
{
	printf("%s\t%s\t\t%s\t\t%s\t\t%s\t\t",p->flightNumber,p->startCity,p->endCity,
	       p->company,p->type);
	printf("%d.%d.%d/%d:%d/%d:%d\t",
	       p->time.year,p->time.month,p->time.day,
	       p->time.original_hour,p->time.original_minute,
	       p->time.end_hour,p->time.end_minute);
	printf("%5.2f        ",p -> price - p -> price * p -> discount);
	printf("已支付\n");
	printf("----------------------------------------------------------");
	printf("----------------------------------------------------------\n");
}


# endif